#coding:utf-8
from commen.tools.__http import *
from commen.api import *

#爬虫helloworld
if __name__ == '__main__':
    # print(get_htmlContent("https://tieba.baidu.com/p/2460150866"))
    imgs = []
    for i in range(1):
        url = url_TIEBA(i)
        # url = url_JD(i)
        html = get_html(url)
        imgs.append(re_PicUrls(html))
    sum = 0
    for img in imgs:
        for imgUrl in img:
            sum += 1
            # print(imgUrl)
            downloadImg(imgUrl)
    print("sum : " + str(sum))